﻿using SqlSugar;

namespace JC_DirectBroadcast.Repository
{
    public class DirectBroadcastDBContext:SqlSugarClient
    {
        public DirectBroadcastDBContext(ConnectionConfig config):base(config)
        {
            //_context = new SqlSugarClient(new ConnectionConfig()
            //{
            //    ConnectionString = ConfigExtensions.Configuration["DbConnection:MySqlConnectionString"],
            //    DbType = DbType.MySql,
            //    IsAutoCloseConnection = true
            //});
            ////调式代码 用来打印SQL 
            //Db.Aop.OnLogExecuting = (sql, pars) =>
            //{
            //    //Console.WriteLine(sql + "\r\n" +
            //    //    Db.Utilities.SerializeObject(pars.ToDictionary(it => it.ParameterName, it => it.Value)));
            //    //Console.WriteLine();
            //};
        }
    }
}
